home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-05-01 | 28.2 KB | 794 lines | [ TEXT/MPS ]
{ File: Kernel.p Contains: Kernel Interfaces Version: Technology: System 8 Release: Universal Interfaces 3.0d3 on Copland DR1 Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved. Bugs?: If you find a problem with this file, send the file and version information (from above) and the problem description to: Internet: apple.bugs@applelink.apple.com AppleLink: APPLE.BUGS } {$IFC UNDEFINED UsingIncludes} {$SETC UsingIncludes := 0} {$ENDC} {$IFC NOT UsingIncludes} UNIT Kernel; INTERFACE {$ENDC} {$IFC UNDEFINED __KERNEL__} {$SETC __KERNEL__ := 1} {$I+} {$SETC KernelIncludes := UsingIncludes} {$SETC UsingIncludes := 1} {$IFC UNDEFINED __ERRORS__} {$I Errors.p} {$ENDC} {$IFC UNDEFINED __MACHINEEXCEPTIONS__} {$I MachineExceptions.p} {$ENDC} {$IFC UNDEFINED __TIMING__} {$I Timing.p} {$ENDC} {$IFC UNDEFINED __TYPES__} {$I Types.p} {$ENDC} {$PUSH} {$ALIGN POWER} {$LibExport+} {$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE } { Kernel basics } TYPE AddressSpaceID = ^LONGINT; IOPreparationID = ^LONGINT; SoftwareInterruptID = ^LONGINT; TaskID = ^LONGINT; TimerID = ^LONGINT; { Tasking } ExecutionLevel = UInt32; CONST kTaskLevel = 0; kSoftwareInterruptLevel = 1; kAcceptFunctionLevel = 2; kKernelLevel = 3; kSIHAcceptFunctionLevel = 4; kSecondaryInterruptLevel = 5; kHardwareInterruptLevel = 6; TYPE SoftwareInterruptHandler = ProcPtr; { PROCEDURE SoftwareInterruptHandler(p1: UNIV Ptr; p2: UNIV Ptr); C; } SecondaryInterruptHandler2 = ProcPtr; { FUNCTION SecondaryInterruptHandler2(p1: UNIV Ptr; p2: UNIV Ptr): OSStatus; C; } { Memory System basics } LogicalAddressRangePtr = ^LogicalAddressRange; LogicalAddressRange = RECORD address: LogicalAddress; count: ByteCount; END; PhysicalAddressRangePtr = ^PhysicalAddressRange; PhysicalAddressRange = RECORD address: PhysicalAddress; count: ByteCount; END; { For PrepareMemoryForIO and CheckpointIO } IOPreparationOptions = OptionBits; CONST kIOMultipleRanges = $00000001; kIOLogicalRanges = $00000002; kIOMinimalLogicalMapping = $00000004; kIOShareMappingTables = $00000008; kIOIsInput = $00000010; kIOIsOutput = $00000020; kIOCoherentDataPath = $00000040; kIOTransferIsLogical = $00000080; kIOClientIsUserMode = $00000080; TYPE IOPreparationState = OptionBits; CONST kIOStateDone = $00000001; kInvalidPageAddress = -1; TYPE AddressRangePtr = ^AddressRange; AddressRange = RECORD base: Ptr; length: ByteCount; END; { C's treatment of arrays and array pointers is atypical } LogicalMappingTable = ARRAY [0..0] OF LogicalAddress; LogicalMappingTablePtr = ^LogicalMappingTable; PhysicalMappingTable = ARRAY [0..0] OF PhysicalAddress; PhysicalMappingTablePtr = ^PhysicalMappingTable; AddressRangeTable = ARRAY [0..0] OF AddressRange; AddressRangeTablePtr = ^AddressRangeTable; MultipleAddressRangePtr = ^MultipleAddressRange; MultipleAddressRange = RECORD entryCount: ItemCount; rangeTable: AddressRangeTablePtr; END; { Separate C definition so that union has a name. A future version of the interfacer tool will allow a name (that gets thrown out in Pascal and Asm). } IOPreparationTablePtr = ^IOPreparationTable; IOPreparationTable = RECORD options: IOPreparationOptions; state: IOPreparationState; preparationID: IOPreparationID; addressSpace: AddressSpaceID; granularity: ByteCount; firstPrepared: ByteCount; lengthPrepared: ByteCount; mappingEntryCount: ItemCount; logicalMapping: LogicalMappingTablePtr; physicalMapping: PhysicalMappingTablePtr; CASE INTEGER OF 0: ( range: AddressRange; ); 1: ( multipleRanges: MultipleAddressRange; ); END; IOCheckpointOptions = OptionBits; CONST kNextIOIsInput = $00000001; kNextIOIsOutput = $00000002; kMoreIOTransfers = $00000004; { For SetProcessorCacheMode } TYPE ProcessorCacheMode = UInt32; CONST kProcessorCacheModeDefault = 0; kProcessorCacheModeInhibited = 1; kProcessorCacheModeWriteThrough = 2; kProcessorCacheModeCopyBack = 3; { For GetPageInformation } kPageInformationVersion = 1; TYPE PageStateInformation = UInt32; CONST kPageIsProtected = $00000001; kPageIsProtectedPrivileged = $00000002; kPageIsModified = $00000004; kPageIsReferenced = $00000008; kPageIsLockedResident = $00000010; kPageIsInMemory = $00000020; kPageIsShared = $00000040; kPageIsWriteThroughCached = $00000080; kPageIsCopyBackCached = $00000100; kPageIsLocked = $00000010; { Deprecated } kPageIsResident = $00000020; { Deprecated } TYPE PageInformationPtr = ^PageInformation; PageInformation = RECORD area: AreaID; count: ItemCount; information: ARRAY [0..0] OF PageStateInformation; END; {$ENDC} {$IFC FOR_SYSTEM8_PREEMPTIVE } TYPE AreaReservationID = ^LONGINT; BackingObjectID = ^LONGINT; EventGroupID = ^LONGINT; MessageID = ^LONGINT; ObjectID = ^LONGINT; PortID = ^LONGINT; ReceiveID = ^LONGINT; KernelProcessID = ^LONGINT; KernelQueueID = ^LONGINT; { System Information } CONST kSystemInformationVersion = 1; TYPE SystemInformationPtr = ^SystemInformation; SystemInformation = RECORD numPhysicalRAMPages: ItemCount; numFreeRAMPages: ItemCount; numEligibleRAMPages: ItemCount; numResidentRAMPages: ItemCount; numInMemoryGlobalPages: ItemCount; numLogicalPages: ItemCount; pageSize: ByteCount; dataCacheBlockSize: ByteCount; processorVersionNumber: UInt32; numCPUs: ItemCount; systemKernelProcessID: KernelProcessID; globalAddressSpaceID: AddressSpaceID; dataCacheSize: ByteCount; instructionCacheSize: ByteCount; cachesAreUnified: BOOLEAN; filler: ARRAY [0..2] OF SInt8; END; { KernelQueue Related Declarations } KernelQueueOptions = OptionBits; { Event Flag Related Declarations } EventGroupMask = UInt32; CONST kEventFlagsPerGroup = 32; TYPE EventFlagOperation = UInt32; CONST kEventFlagAll = 0; kEventFlagAny = 1; kEventFlagAllClear = 2; kEventFlagAnyClear = 3; kEventFlagSharedClear = 4; TYPE KernelNotificationPtr = ^KernelNotification; KernelNotification = RECORD eventGroup: EventGroupID; eventMask: EventGroupMask; swi: SoftwareInterruptID; kernelQueue: KernelQueueID; queueP1: Ptr; queueP2: Ptr; END; { Task Related Declarations } KernelProcessName = OSType; TaskName = OSType; TaskProc = ProcPtr; { FUNCTION TaskProc(parameter: UNIV Ptr): OSStatus; C; } TaskStorageIndex = UInt32; TaskStorageValue = Ptr; TaskRelationship = UInt32; CONST kTaskOnly = 0; kTaskAndChildren = 1; kTaskFamily = 2; kTaskKernelProcess = 3; TYPE SetTaskPriorityOptions = OptionBits; CONST kTaskRaisePriorityBy = $00000200; kTaskLowerPriorityBy = $00000400; kTaskRaisePriorityToAtLeast = $00000800; kTaskLowerPriorityToAtMost = $00001000; TYPE TaskOptions = OptionBits; CONST kTaskIsOrphan = $00400000; kTaskIsResident = $00004000; { Priorities are used by CreateTask, SetTaskPriority, and AcceptMessage. } TYPE TaskPriority = OptionBits; CONST kTaskPriorityMask = $0000001F; kTaskPriorityIsAbsolute = $00000100; kTaskPriorityIsSymbolic = $00002000; kTaskBackgroundPriority = $00002001; { Gets only otherwise idle time } kTaskAppCPUBoundPriority = $00002002; { For CPU bound tasks } kTaskAppNonUIPriority = $00002003; { For general secondary tasks } kTaskAppPriority = $00002004; { Primary tasks } kTaskUIHelperPriority = $00002005; { Toolbox helper tasks } kTaskLowServerPriority = $00002006; { System servers } kTaskServerPriority = $00002007; { System serverss } kTaskHighServerPriority = $00002008; { System servers } kTaskLowDriverPriority = $00002009; { IO Families & plug-ins } kTaskDriverPriority = $0000200A; { IO Families & plug-ins } kTaskHighDriverPriority = $0000200B; { IO Families & plug-ins } kTaskRealTimePriority1 = $0000200C; { Lowest real time priority } kTaskRealTimePriority2 = $0000200D; kTaskRealTimePriority3 = $0000200E; kTaskRealTimePriority4 = $0000200F; kTaskRealTimePriority5 = $00002010; kTaskRealTimePriority6 = $00002011; kTaskRealTimePriority7 = $00002012; kTaskRealTimePriority8 = $00002013; kTaskRealTimePriority9 = $00002014; kTaskRealTimePriority10 = $00002015; kTaskRealTimePriority11 = $00002016; kTaskRealTimePriority12 = $00002017; kTaskRealTimePriority13 = $00002018; kTaskRealTimePriority14 = $00002019; kTaskRealTimePriority15 = $0000201A; kTaskRealTimePriority16 = $0000201B; { Highest real time priority } TYPE TerminateOptions = OptionBits; SchedulerState = OSType; CONST kTaskInformationVersion = 1; TYPE TaskInformationPtr = ^TaskInformation; TaskInformation = RECORD name: TaskName; owningKernelProcess: KernelProcessID; options: TaskOptions; { Includes originally specified symbolic priority } priority: TaskPriority; { Absolute priority } taskState: SchedulerState; swiState: SchedulerState; isTerminating: BOOLEAN; reserved2: ARRAY [0..2] OF BOOLEAN; softwareInterrupts: ItemCount; stackLimit: LogicalAddress; stackSize: ByteCount; creationTime: AbsoluteTime; cpuTime: AbsoluteTime; reserved: Ptr; END; KernelProcessOptions = OptionBits; CONST kKernelProcessIsPrivileged = $00000001; kKernelProcessInformationVersion = 1; TYPE KernelProcessInformationPtr = ^KernelProcessInformation; KernelProcessInformation = RECORD name: KernelProcessName; addressSpace: AddressSpaceID; options: KernelProcessOptions; END; { Timer related declarations } TimerOptions = OptionBits; { Address Space Management related declarations } { General definitions } CONST kNoBackingObjectID = 0; TYPE AreaOptions = OptionBits; CONST kZeroFill = $00000001; kResidentArea = $00000002; kSparseArea = $00000004; kPlacedArea = $00000008; kGlobalArea = $00000010; kPhysicallyContiguousArea = $00000020; kMassMappedArea = $00000040; TYPE InterspaceCopyOptions = OptionBits; CONST kCheckSourceUserRights = $00000001; kCheckDestinationUserRights = $00000002; TYPE AreaUsage = UInt32; CONST kUsageUnknown = 0; kUsageRAM = 1; kUsageROM = 2; kUsageIO = 3; kUsageVideoRAM = 4; TYPE MemoryAccessLevel = UInt32; CONST kMemoryExcluded = 0; kMemoryReadOnly = 1; kMemoryReadWrite = 2; kMemoryCopyOnWrite = 3; kInheritUserAccess = 4; kInheritPrivilegedAccess = 5; TYPE BackingAddress = UInt64; BackingAddressPtr = ^BackingAddress; BackingLength = UInt64; BackingLengthPtr = ^BackingLength; { For GetSpaceInformation } CONST kSpaceInformationVersion = 1; TYPE SpaceInformationPtr = ^SpaceInformation; SpaceInformation = RECORD numLogicalPages: ItemCount; numInMemoryPages: ItemCount; numResidentPages: ItemCount; END; { For GetAreaInformation } CONST kAreaInformationVersion = 1; TYPE AreaInformationPtr = ^AreaInformation; AreaInformation = RECORD addressSpace: AddressSpaceID; base: LogicalAddress; length: ByteCount; userAccessLevel: MemoryAccessLevel; privilegedAccessLevel: MemoryAccessLevel; usage: AreaUsage; backingObject: BackingObjectID; backingBase: BackingAddress; options: AreaOptions; owningKernelProcess: KernelProcessID; END; { For Memory Reservations } ReservationOptions = OptionBits; CONST kPlacedReservation = $00000001; kGlobalReservation = $00000002; kGlobalAreaReservation = $00000004; { For GetReservationInformation } kReservationInformationVersion = 1; TYPE ReservationInformationPtr = ^ReservationInformation; ReservationInformation = RECORD addressSpace: AddressSpaceID; base: LogicalAddress; length: ByteCount; options: ReservationOptions; END; { For ControlPagingForRange } PageControlOperation = UInt32; CONST kControlPageMakePageable = 1; kControlPageMakeResident = 2; kControlPageCommit = 3; kControlPageTouch = 4; kControlPageReplace = 5; kControlPageFlush = 6; kControlPageFlushAsync = 7; { For ReleaseData } TYPE ReleaseDataOptions = OptionBits; CONST kReleaseBackingStore = $00000001; { Message related declarations } TYPE MessageType = UInt32; { Kernel Message Types } CONST kAllNonKernelMessageTypes = $0FFFFFFF; kAllMessages = $FFFFFFFF; { Options for CreatePort } TYPE PortOptions = OptionBits; { Options for CreateObject } ObjectOptions = OptionBits; { Options for LockObject } ObjectLockOptions = OptionBits; CONST kLockObjectWithOneMessage = $00000001; { Options for SetObjectInformation; } TYPE SetObjectOptions = OptionBits; CONST kSetObjectPort = $00000002; kSetObjectRefcon = $00000004; { Message System Options } TYPE SendOptions = OptionBits; CONST kSendTransferKindMask = $00000003; { Set by sender } kSendByChoice = $00000000; kSendByReference = $00000001; kSendByValue = $00000002; kSendIsBuffered = $00000003; kSendIsPrivileged = $00000008; { Set by kernel } kSendIsAtomic = $00000010; { Set by sender } kSendPtrsAddressable = $00000020; { Set by kernel } kSendPtrsNeedAccessCheck = $00000040; { Set by kernel } TYPE ReceiveOptions = OptionBits; CONST kReceiveNoAddressTranslation = $00000002; TYPE AcceptOptions = OptionBits; CONST kAcceptFunctionIsResident = $00010000; { Message Definition (Given to receiver or acceptor) } TYPE MessageControlBlockPtr = ^MessageControlBlock; MessageControlBlock = RECORD message: MessageID; addressSpace: AddressSpaceID; sendingKernelProcess: KernelProcessID; sendingTask: TaskID; refcon: Ptr; options: SendOptions; theType: MessageType; messageContents: LogicalAddress; messageContentsSize: ByteCount; replyBuffer: LogicalAddress; replyBufferSize: ByteCount; currentStatus: OSStatus; reserved: ARRAY [0..3] OF UInt32; END; CONST kMessageInformationVersion = 1; TYPE MessageInformationPtr = ^MessageInformation; MessageInformation = RECORD object: ObjectID; sendingTask: TaskID; sendingKernelProcess: KernelProcessID; END; { Message Accept proc used to receive a message } MessageAcceptProc = ProcPtr; { FUNCTION MessageAcceptProc((CONST)VAR message: MessageControlBlock; acceptRefcon: UNIV Ptr): OSStatus; C; } { Version for GetPortInformation } CONST kPortInformationVersion = 1; { Buffer used to return message port information } TYPE PortInformationPtr = ^PortInformation; PortInformation = RECORD owningKernelProcess: KernelProcessID; acceptProc: MessageAcceptProc; acceptHandler: ExceptionHandler; theAcceptOptions: AcceptOptions; acceptRefcon: Ptr; objectCount: ItemCount; pendingReceives: ItemCount; pendingSends: ItemCount; pendingReplies: ItemCount; transactionCount: ItemCount; blockedAsyncSenders: ItemCount; blockedAsyncReceivers: ItemCount; END; {$ENDC} {$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE } { Tasks } FUNCTION CurrentExecutionLevel: ExecutionLevel; C; FUNCTION CurrentTaskID: TaskID; C; FUNCTION DelayFor(delayDuration: Duration): OSStatus; C; FUNCTION InPrivilegedMode: BOOLEAN; C; { Software Interrupts } FUNCTION CreateSoftwareInterrupt(handler: SoftwareInterruptHandler; task: TaskID; p1: UNIV Ptr; persistent: BOOLEAN; VAR theSoftwareInterrupt: SoftwareInterruptID): OSStatus; C; FUNCTION SendSoftwareInterrupt(theSoftwareInterrupt: SoftwareInterruptID; p2: UNIV Ptr): OSStatus; C; FUNCTION DeleteSoftwareInterrupt(theSoftwareInterrupt: SoftwareInterruptID): OSStatus; C; PROCEDURE DisableSoftwareInterrupts; C; PROCEDURE EnableSoftwareInterrupts; C; FUNCTION InSoftwareInterruptHandler: BOOLEAN; C; { Completion Routines } PROCEDURE DisableCompletionRoutines; C; PROCEDURE EnableCompletionRoutines; C; { Secondary Interrupts } FUNCTION CallSecondaryInterruptHandler2(theHandler: SecondaryInterruptHandler2; exceptionHandler: ExceptionHandler; p1: UNIV Ptr; p2: UNIV Ptr): OSStatus; C; FUNCTION QueueSecondaryInterruptHandler(theHandler: SecondaryInterruptHandler2; exceptionHandler: ExceptionHandler; p1: UNIV Ptr; p2: UNIV Ptr): OSStatus; C; { Timers } FUNCTION SetInterruptTimer({CONST}VAR expirationTime: AbsoluteTime; handler: SecondaryInterruptHandler2; p1: UNIV Ptr; VAR theTimer: TimerID): OSStatus; C; FUNCTION CancelTimer(theTimer: TimerID; VAR timeRemaining: AbsoluteTime): OSStatus; C; { IO related Operations } FUNCTION PrepareMemoryForIO(VAR theIOPreparationTable: IOPreparationTable): OSStatus; C; FUNCTION CheckpointIO(theIOPreparation: IOPreparationID; options: IOCheckpointOptions): OSStatus; C; { Memory Operations } FUNCTION GetPageInformation(addressSpace: AddressSpaceID; base: ConstLogicalAddress; requestedPages: ItemCount; version: PBVersion; VAR thePageInfo: PageInformation): OSStatus; C; { Processor Cache Related } FUNCTION SetProcessorCacheMode(addressSpace: AddressSpaceID; base: ConstLogicalAddress; length: ByteCount; cacheMode: ProcessorCacheMode): OSStatus; C; {$ENDC} {$IFC FOR_SYSTEM8_PREEMPTIVE } { Queues } FUNCTION CreateKernelQueue(options: KernelQueueOptions; VAR theQueue: KernelQueueID): OSStatus; C; FUNCTION DeleteKernelQueue(theQueue: KernelQueueID): OSStatus; C; FUNCTION WaitOnKernelQueue(theQueue: KernelQueueID; VAR p1: UNIV Ptr; VAR p2: UNIV Ptr; VAR p3: UNIV Ptr; timeOut: Duration): OSStatus; C; FUNCTION NotifyKernelQueue(theQueue: KernelQueueID; p1: UNIV Ptr; p2: UNIV Ptr; p3: UNIV Ptr): OSStatus; C; FUNCTION AdjustKernelQueueSIHLimit(theQueue: KernelQueueID; amount: SInt32; VAR newLimit: ItemCount): OSStatus; C; { Event Flag Related Operations } FUNCTION CreateEventGroup(VAR theGroup: EventGroupID): OSStatus; C; FUNCTION DeleteEventGroup(theGroup: EventGroupID): OSStatus; C; FUNCTION SetEvents(theGroup: EventGroupID; mask: EventGroupMask): OSStatus; C; FUNCTION ClearEvents(theGroup: EventGroupID; mask: EventGroupMask): OSStatus; C; FUNCTION ReadEvents(theGroup: EventGroupID; VAR currentValue: EventGroupMask): OSStatus; C; FUNCTION WaitForEvents(theGroup: EventGroupID; timeOut: Duration; mask: EventGroupMask; operation: EventFlagOperation; VAR value: EventGroupMask): OSStatus; C; { KernelProcess Related Operations } FUNCTION CreateKernelProcess(name: KernelProcessName; addressSpace: AddressSpaceID; options: KernelProcessOptions; VAR theKernelProcess: KernelProcessID): OSStatus; C; FUNCTION ExitKernelProcess(options: TerminateOptions; exitStatus: OSStatus): OSStatus; C; FUNCTION DeleteKernelProcess(theKernelProcess: KernelProcessID; options: TerminateOptions; deleteStatus: OSStatus): OSStatus; C; FUNCTION GetKernelProcessesInSystem(requestedKernelProcesses: ItemCount; VAR totalKernelProcesses: ItemCount; VAR theKernelProcesses: KernelProcessID): OSStatus; C; FUNCTION GetKernelProcessInformation(theKernelProcess: KernelProcessID; version: PBVersion; VAR kernelProcessInfo: KernelProcessInformation): OSStatus; C; FUNCTION CurrentKernelProcessID: KernelProcessID; C; { Task Related Operations } FUNCTION CreateTask(name: TaskName; owningKernelProcess: KernelProcessID; entryPoint: TaskProc; parameter: UNIV Ptr; stackBase: LogicalAddress; stackSize: ByteCount; {CONST}VAR notification: KernelNotification; options: TaskOptions; VAR theTask: TaskID): OSStatus; C; FUNCTION ExitTask(options: TerminateOptions; exitStatus: OSStatus): OSStatus; C; FUNCTION TerminateTask(theTask: TaskID; scope: TaskRelationship; options: TerminateOptions; terminateStatus: OSStatus): OSStatus; C; FUNCTION RemainingStackSpace: ByteCount; C; FUNCTION GetTaskInformation(theTask: TaskID; version: PBVersion; VAR taskInfo: TaskInformation): OSStatus; C; FUNCTION SetTaskPriority(theTask: TaskID; scope: TaskRelationship; options: SetTaskPriorityOptions): OSStatus; C; FUNCTION GetTasksInKernelProcess(kernelProcess: KernelProcessID; requestedTasks: ItemCount; VAR totalTasks: ItemCount; VAR theTasks: TaskID): OSStatus; C; FUNCTION AllocateTaskStorageIndex(VAR theIndex: TaskStorageIndex): OSStatus; C; FUNCTION DeallocateTaskStorageIndex(theIndex: TaskStorageIndex): OSStatus; C; FUNCTION SetTaskStorageValue(theIndex: TaskStorageIndex; newValue: TaskStorageValue): OSStatus; C; FUNCTION GetTaskStorageValue(theIndex: TaskStorageIndex): TaskStorageValue; C; { Secondary Interrupt Handlers } FUNCTION AdjustSecondaryInterruptHandlerLimit(amount: SInt32; VAR newLimit: ItemCount): OSStatus; C; { Timers } FUNCTION DelayUntil({CONST}VAR expirationTime: AbsoluteTime): OSStatus; C; FUNCTION SetTimer({CONST}VAR expirationTime: AbsoluteTime; {CONST}VAR notification: KernelNotification; options: TimerOptions; VAR theTimer: TimerID): OSStatus; C; FUNCTION ResetTimer(theTimer: TimerID; {CONST}VAR expirationTime: AbsoluteTime; {CONST}VAR notification: KernelNotification; options: TimerOptions): OSStatus; C; FUNCTION AdjustInterruptTimerSIHLimit(amount: SInt32; VAR newLimit: ItemCount): OSStatus; C; { Address Space Management } FUNCTION CreateAddressSpace(VAR theAddressSpace: AddressSpaceID): OSStatus; C; FUNCTION DeleteAddressSpace(theAddressSpace: AddressSpaceID): OSStatus; C; FUNCTION GetAddressSpacesInSystem(requestedAddressSpaces: ItemCount; VAR totalAddressSpaces: ItemCount; VAR theAddressSpaces: AddressSpaceID): OSStatus; C; FUNCTION GetSpaceInformation(theAddressSpace: AddressSpaceID; version: PBVersion; VAR spaceInfo: SpaceInformation): OSStatus; C; FUNCTION InterspaceBlockCopy(sourceAddressSpace: AddressSpaceID; targetAddressSpace: AddressSpaceID; sourceBase: ConstLogicalAddress; targetBase: LogicalAddress; length: ByteCount; options: InterspaceCopyOptions): OSStatus; C; FUNCTION CheckUserAccess(address: ConstLogicalAddress; length: ByteCount; referenceKind: MemoryReferenceKind): OSStatus; C; FUNCTION CurrentAddressSpaceID: AddressSpaceID; C; { Area Management } FUNCTION CreateArea(owningKernelProcess: KernelProcessID; backingObject: BackingObjectID; {CONST}VAR backingBase: BackingAddress; backingLength: ByteCount; userAccessLevel: MemoryAccessLevel; privilegedAccessLevel: MemoryAccessLevel; guardLength: ByteCount; options: AreaOptions; VAR areaBase: LogicalAddress; VAR theArea: AreaID): OSStatus; C; FUNCTION CreateAreaForRange(owningKernelProcess: KernelProcessID; otherSpace: AddressSpaceID; otherBase: ConstLogicalAddress; length: ByteCount; userAccessLevel: MemoryAccessLevel; privilegedAccessLevel: MemoryAccessLevel; guardLength: ByteCount; options: AreaOptions; VAR areaBase: LogicalAddress; VAR theArea: AreaID): OSStatus; C; FUNCTION DeleteArea(theArea: AreaID): OSStatus; C; FUNCTION GetAreaInformation(theArea: AreaID; version: PBVersion; VAR areaInfo: AreaInformation): OSStatus; C; FUNCTION GetAreaFromAddress(addressSpace: AddressSpaceID; address: ConstLogicalAddress; VAR theArea: AreaID): OSStatus; C; FUNCTION GetAreasInAddressSpace(addressSpace: AddressSpaceID; requestedAreas: ItemCount; VAR totalAreas: ItemCount; VAR theAreas: AreaID): OSStatus; C; FUNCTION SetAreaAccess(theArea: AreaID; userAccessLevel: MemoryAccessLevel; privilegedAccessLevel: MemoryAccessLevel): OSStatus; C; FUNCTION SetAreaBackingBase(theArea: AreaID; {CONST}VAR backingBase: BackingAddress): OSStatus; C; FUNCTION CreateAreaReservation(owningKernelProcess: KernelProcessID; VAR reservationBase: LogicalAddress; length: ByteCount; options: ReservationOptions; VAR theReservation: AreaReservationID): OSStatus; C; FUNCTION DeleteAreaReservation(theReservation: AreaReservationID): OSStatus; C; FUNCTION GetReservationInformation(theReservation: AreaReservationID; version: PBVersion; VAR reservationInfo: ReservationInformation): OSStatus; C; FUNCTION GetReservationsInAddressSpace(addressSpace: AddressSpaceID; requestedReservations: ItemCount; VAR totalReservations: ItemCount; VAR theReservations: AreaReservationID): OSStatus; C; { Processor Cache Related } FUNCTION DataToCode(addressSpace: AddressSpaceID; base: ConstLogicalAddress; length: ByteCount): OSStatus; C; FUNCTION FlushRange(addressSpace: AddressSpaceID; base: ConstLogicalAddress; length: ByteCount): OSStatus; C; { Paging control operations } FUNCTION ControlPagingForRange(addressSpace: AddressSpaceID; base: ConstLogicalAddress; length: ByteCount; operation: PageControlOperation): OSStatus; C; FUNCTION ReleaseData(addressSpace: AddressSpaceID; base: ConstLogicalAddress; length: ByteCount; options: ReleaseDataOptions): OSStatus; C; { Message Port Management } FUNCTION CreatePort(options: PortOptions; VAR thePort: PortID): OSStatus; C; FUNCTION DeletePort(thePort: PortID): OSStatus; C; FUNCTION GetPortInformation(thePort: PortID; version: PBVersion; VAR portInfo: PortInformation): OSStatus; C; FUNCTION GetPortsInSystem(requestedPorts: ItemCount; VAR totalPorts: ItemCount; VAR thePorts: PortID): OSStatus; C; { Message Object Management } FUNCTION CreateObject(port: PortID; refcon: UNIV Ptr; options: ObjectOptions; VAR theObject: ObjectID): OSStatus; C; FUNCTION DeleteObject(theObject: ObjectID): OSStatus; C; FUNCTION LockObject(theObject: ObjectID; options: ObjectLockOptions; timeOut: Duration): OSStatus; C; FUNCTION UnlockObject(theObject: ObjectID): OSStatus; C; FUNCTION GetObjectInformation(theObject: ObjectID; VAR port: PortID; VAR refcon: UNIV Ptr): OSStatus; C; FUNCTION SetObjectInformation(theObject: ObjectID; options: SetObjectOptions; port: PortID; refcon: UNIV Ptr): OSStatus; C; FUNCTION GetObjectsInPort(port: PortID; requestedObjects: ItemCount; VAR totalObjects: ItemCount; VAR theObjects: ObjectID): OSStatus; C; { Message Transaction Operations } FUNCTION SendMessageSync(object: ObjectID; theType: MessageType; messageContents: ConstLogicalAddress; messageContentsSize: ByteCount; replyBuffer: LogicalAddress; VAR replyBufferSize: ByteCount; options: SendOptions; timeOut: Duration): OSStatus; C; FUNCTION SendMessageAsync(object: ObjectID; theType: MessageType; messageContents: ConstLogicalAddress; messageContentsSize: ByteCount; replyBuffer: LogicalAddress; replyBufferSize: ByteCount; options: SendOptions; {CONST}VAR notification: KernelNotification; VAR replySize: ByteCount; VAR theMessage: MessageID): OSStatus; C; FUNCTION AcceptMessage(port: PortID; theTypes: MessageType; acceptProc: MessageAcceptProc; theExceptionHandler: ExceptionHandler; options: AcceptOptions; acceptRefcon: UNIV Ptr): OSStatus; C; FUNCTION ReceiveMessageSync(port: PortID; theTypes: MessageType; VAR theControlBlock: MessageControlBlock; buffer: LogicalAddress; bufferSize: ByteCount; options: ReceiveOptions; timeOut: Duration): OSStatus; C; FUNCTION ReceiveMessageAsync(port: PortID; theTypes: MessageType; VAR theControlBlock: MessageControlBlock; buffer: LogicalAddress; bufferSize: ByteCount; options: ReceiveOptions; {CONST}VAR notification: KernelNotification; VAR theReceive: ReceiveID): OSStatus; C; FUNCTION ReplyToMessage(theMessage: MessageID; status: OSStatus; replyBuffer: ConstLogicalAddress; replyBufferSize: ByteCount): OSStatus; C; FUNCTION ReplyToMessageAndReceive(theMessage: MessageID; status: OSStatus; replyBuffer: ConstLogicalAddress; replyBufferSize: ByteCount; port: PortID; theTypes: MessageType; VAR theControlBlock: MessageControlBlock; receiveBuffer: LogicalAddress; receiveBufferSize: ByteCount; options: ReceiveOptions; timeOut: Duration): OSStatus; C; { Miscellaneous Messaging operations } FUNCTION CancelAsyncSend(theMessage: MessageID): OSStatus; C; FUNCTION CancelAsyncReceive(theReceive: ReceiveID): OSStatus; C; FUNCTION GetMessageInformation(theMessage: MessageID; version: PBVersion; VAR messageInfo: MessageInformation): OSStatus; C; { Miscellaneous System operations } FUNCTION GetSystemInformation(version: PBVersion; VAR systemInfo: SystemInformation): OSStatus; C; { Notifications } FUNCTION DeliverKernelNotification({CONST}VAR notification: KernelNotification; status: OSStatus): OSStatus; C; {$ENDC} {$IFC FOR_SYSTEM8_PREEMPTIVE } { These are defined in Memory for System 7 } PROCEDURE BlockMove(srcPtr: UNIV Ptr; destPtr: UNIV Ptr; byteCount: LONGINT); PROCEDURE BlockMoveData(srcPtr: UNIV Ptr; destPtr: UNIV Ptr; byteCount: LONGINT); PROCEDURE BlockMoveUncached(srcPtr: UNIV Ptr; destPtr: UNIV Ptr; byteCount: LONGINT); C; PROCEDURE BlockMoveDataUncached(srcPtr: UNIV Ptr; destPtr: UNIV Ptr; byteCount: LONGINT); C; PROCEDURE BlockZero(destPtr: UNIV Ptr; byteCount: LONGINT); C; PROCEDURE BlockZeroUncached(destPtr: UNIV Ptr; byteCount: LONGINT); C; {$ENDC} {$ALIGN RESET} {$POP} {$SETC UsingIncludes := KernelIncludes} {$ENDC} {__KERNEL__} {$IFC NOT UsingIncludes} END. {$ENDC}